#include <iostream>

#define PI 3.1415926        // FIXME: 最好在必要的地方加上空行，这样看着清楚

using namespace std;

int main()
{
    cout << "请选择图形的种类 : "<< endl;
    cout << "圆形 - 0 " << endl
         << "长方形 - 1" << endl
         << "正方形 - 2" << endl;
    int n,r,a,b,c;
    
    cin >> n;
    switch(n)
    {
    case 0: {
        cout << "请输入圆形的半径 ：" ;
        cin >> r;
        cout << "S = " << PI*r*r << endl;
        break;
    }
    case 1: {
        cout << "请输入长方形的长与宽 ：";
        cin >> a >> b;
        cout << "S = " << a*b << endl;
        break;
    }
    case 2: {
        cout << "请输入正方形的边长 ：";
        cin >> c;
        cout << "S = " << c*c <<endl;
        break;
    }
    }

    return 0;
}
